﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace University.Workshop.DataAccess
{
    public class LanguageClientSingleton
    {
        private string Language;
        private static readonly object PadLock = new object();
        private static LanguageClientSingleton SingletonInstance = null;

        private LanguageClientSingleton()
        {
            this.Language = "EN-EU";
        }

        //Propiety to access to the instance
        public static LanguageClientSingleton Instance
        {
            get
            {
                //If the instace was created
                lock (PadLock)
                {
                    if (SingletonInstance == null)
                    {
                        SingletonInstance = new LanguageClientSingleton();
                    }
                    return (SingletonInstance);
                }
            }
        }

        public string GetLanguageClient
        {
            get
            {
                return (this.Language);
            }
        }

        public void SetLanguageClient(string language)
        {
            this.Language = language;
        }
    }
}
